This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leezu
requested review from
aaronmarkham,
eric-haibin-lin,
marcoabreu and
szha
as code owners
February 13, 2020 02:41
larroy
approved these changes
Feb 13, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -391,7 +390,7 @@ testing datasets. | |||
|
|||
|
|||
def write_sentences(sentences, file_path): | |||
with io.open(file_path, 'w', encoding='utf-8') as of: | |||
with open(file_path, 'w', encoding='utf-8') as of: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't utf8 by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Default is platform dependent. https://docs.python.org/3/library/functions.html#open
ChaiBapchya
approved these changes
Feb 13, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! LGTM! Thanks!
zheyuye
pushed a commit
to zheyuye/incubator-mxnet
that referenced
this pull request
Feb 19, 2020
* Drop _cy2 * Drop Python 2 specific code in mxnet and tests * Replace io.open with open * Drop from __future__ imports * Fix lint
anirudh2290
pushed a commit
to anirudh2290/mxnet
that referenced
this pull request
May 29, 2020
* Drop _cy2 * Drop Python 2 specific code in mxnet and tests * Replace io.open with open * Drop from __future__ imports * Fix lint
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR drops some Python 2 compatibility code from the codebase. Makes the code easier to read.
Changes